{% block sw_landing_page_detail_base %}
<div class="sw-landing-page-detail-base">

    {% block sw_landing_page_detail_base_information %}
    <mt-card
        position-identifier="sw-landing-page-detail-base"
        :title="$tc('sw-landing-page.base.general.headlineInformationCard')"
        :is-loading="isLoading"
    >
        <sw-container
            columns="repeat(auto-fit, minmax(150px, 1fr))"
            gap="0px 30px"
        >

            {% block sw_landing_page_detail_base_information_name %}

            <mt-text-field
                v-model="landingPage.name"
                required
                name="landingPageName"
                validation="required"
                :disabled="!acl.can('landing_page.editor')"
                :label="$tc('sw-landing-page.base.general.labelName')"
                :placeholder="placeholder(landingPage, 'name')"
                :error="landingPageNameError"
            />
            {% endblock %}

            {% block sw_landing_page_detail_base_information_active %}

            <mt-switch
                v-model="landingPage.active"
                class="sw-landing-page-detail-base__active"
                name="landingPageActive"
                :disabled="!acl.can('landing_page.editor')"
                :label="$tc('sw-landing-page.base.general.isActiveLabel')"
            />
            {% endblock %}
        </sw-container>

        {% block sw_landing_page_detail_base_seo_form_sales_channel %}
        <sw-entity-multi-select
            v-model:entity-collection="landingPage.salesChannels"
            required
            class="sw-landing-page-detail-base__sales_channel"
            entity-name="sales_channel"
            :disabled="!acl.can('landing_page.editor')"
            :label="$tc('sw-landing-page.base.seo.labelSalesChannel')"
            :placeholder="$tc('sw-landing-page.base.seo.placeholderSalesChannel')"
            :error="landingPageSalesChannelsError"
        />
        {% endblock %}

        {% block sw_landing_page_detail_base_information_tags %}
        <sw-entity-tag-select
            v-if="landingPage && !isLoading"
            v-model:entity-collection="landingPage.tags"
            class="sw-landing-page-detail-base__tags"
            :label="$tc('sw-landing-page.base.general.labelTags')"
            :placeholder="$tc('sw-landing-page.base.general.labelTagsPlaceholder')"
            :disabled="!acl.can('landing_page.editor')"
        />
        {% endblock %}
    </mt-card>
    {% endblock %}

    {% block sw_landing_page_detail_base_seo %}
    <mt-card
        position-identifier="sw-landing-page-detail-seo"
        :title="$tc('sw-landing-page.base.seo.title')"
        :is-loading="isLoading"
    >
        <mt-banner
            v-if="!isLayoutSet"
            variant="attention"
            :title="$tc('sw-landing-page.base.seo.notification.noLayoutAssigned')"
        >
            {{ $tc('sw-landing-page.base.seo.notification.noLayoutAssigned') }}
        </mt-banner>

        {% block sw_landing_page_detail_base_seo_form %}
        <div class="sw-landing-page-detail-base__seo-form">

            {% block sw_landing_page_detail_base_seo_form_meta_title %}

            <mt-text-field
                v-model="landingPage.metaTitle"
                maxlength="255"
                :disabled="!acl.can('landing_page.editor')"
                :label="$tc('sw-landing-page.base.seo.labelMetaTitle')"
                :help-text="$tc('sw-landing-page.base.seo.helpTextMetaTitle')"
                :placeholder="placeholder(landingPage, 'metaTitle', $tc('sw-landing-page.base.seo.placeholderMetaTitle'))"
            />
            {% endblock %}

            {% block sw_landing_page_detail_base_seo_form_meta_description %}
            <mt-textarea
                v-model="landingPage.metaDescription"
                maxlength="255"
                :disabled="!acl.can('landing_page.editor')"
                :label="$tc('sw-landing-page.base.seo.labelMetaDescription')"
                :help-text="$tc('sw-landing-page.base.seo.helpTextMetaDescription')"
                :placeholder="placeholder(landingPage, 'metaDescription', $tc('sw-landing-page.base.seo.placeholderMetaDescription'))"
            />
            {% endblock %}

            {% block sw_landing_page_detail_base_seo_form_keywords %}

            <mt-text-field
                v-model="landingPage.keywords"
                :disabled="!acl.can('landing_page.editor')"
                :label="$tc('sw-landing-page.base.seo.labelKeywords')"
                :placeholder="placeholder(landingPage, 'keywords', $tc('sw-landing-page.base.seo.placeholderKeywords'))"
            />
            {% endblock %}

            {% block sw_landing_page_detail_base_seo_form_url %}

            <mt-text-field
                v-model="landingPage.url"
                required
                name="landingPageUrl"
                :disabled="!acl.can('landing_page.editor')"
                :label="$tc('sw-landing-page.base.seo.labelUrl')"
                :placeholder="placeholder(landingPage, 'url', $tc('sw-landing-page.base.seo.placeholderUrl'))"
                :error="landingPageUrlError"
            />
            {% endblock %}

        </div>
        {% endblock %}

    </mt-card>
    {% endblock %}

    {% block sw_landing_page_detail_base_attribute_sets %}
    <mt-card
        v-if="customFieldSetsArray.length > 0"
        position-identifier="sw-landing-page-detail-attribute-sets"
        :title="$tc('sw-settings-custom-field.general.mainMenuItemGeneral')"
        :is-loading="isLoading"
    >
        <sw-custom-field-set-renderer
            :entity="landingPage"
            :sets="customFieldSetsArray"
        />
    </mt-card>
    {% endblock %}
</div>
{% endblock %}
